
<div class="grid_12">
   <div class="box">
      <div class="header">
      <?php echo $this->Html->image('icons/packs/fugue/16x16/shadeless/table-excel.png', array("width"=>16, "height"=>16));?>
      <h3>Propietarios</h3><span></span>
      </div><!--end of header-->
      <div class="content">
         <table id="table-example" class="table">
            <thead>
               <tr>
                <th>Nro</th>
                <th>Nombre</th>
                <th>Direccion</th>
                <th>Tel&eacute;fono</th>
                <th>Estado</th>
                <th>Correo</th>
                <th>Acciones</th>
               </tr>
            </thead><!--end of thead table-->
            <tbody>
              <?php $i=0;?>
              <?php foreach($propietarios as $propietario):?>
                                    
              <tr <?php echo fmod($i, 2) ? "class = gradeX" : "gradeA";?>>
              <?php $i++;?>
              <td><?php echo $i;?></td>
              
              <td class="center"><?php echo $propietario['Propietario']['nombre']; ?></td>
              <td class="center"><?php echo $propietario['Propietario']['direccion']; ?></td>
              <td class="center">
                 <?php echo $propietario['Propietario']['celular'];?> &nbsp;
                 <?php echo $propietario['Propietario']['telefono1'];?> &nbsp;
                 <?php echo $propietario['Propietario']['telefono2'];?> &nbsp;
              </td>
              <?php 
              $estado = $propietario['Propietario']['estado'];
              if($estado == 1):
                 $descestado = "HABILITADO";
              else:
                $descestado = "DESHABILITADO";
              endif;
              ?>      
              <td class="center"><span <?php echo fmod($estado, 2) ? "class = deshabilitado" : "habilitado";?>><?php echo $descestado; ?></span></td>
              <td><?php echo $propietario['Propietario']['email1'];?> &nbsp; <?php echo $propietario['Propietario']['email2'];?></td>
              <td>
              <?php echo $this->Html->link($this->Html->image('edit.png', array("alt" => 'Editar', 'title' => 'editar')), array('action' => 'editar', $propietario['Propietario']['id']), array('escape' => false)); ?>
              <?php if($estado == 1):?>
              <?php echo $this->Html->link($this->Html->image('icons/packs/diagona/16x16/104.png', array("alt" => 'dar baja', 'title' => 'dar de baja')), array('action' => 'baja', $propietario['Propietario']['id']), array('escape' => false)); ?>
              <?php else:?>
              <?php echo $this->Html->link($this->Html->image('icons/packs/diagona/16x16/102.png', array("alt" => 'dar alta', 'title' => 'dar de alta')), array('action' => 'alta', $propietario['Propietario']['id']), array('escape' => false)); ?>
              <?php endif;?>
              <?php echo $this->Html->link(
              $this->Html->image("del.png", array("alt"=>"eliminar", 'title' => 'eliminar')),
              array('action'=>"eliminar",$propietario['Propietario']['id']),
              array('escape' => false),
              ('Desea realmente eliminar?')
              ); ?>
              <?php /*
              echo $this->Html->link(
              $this->Html->image("icons/packs/diagona/16x16/062.png", array("alt"=>"imprimir")), 
              array('action' => 'imprimir', $propietario['Propietario']['id']),
              array('escape' => false)
              ); */?>
              </td>
              
              </tr>
              <?php endforeach;?>
            </tbody>
         </table><!--end of table-->
      </div><!--end of content-->
      <div class="clear"></div>
      
   </div><!--end of box-->  
</div><!--end of grid 12 contendedor tabla-->
<div class="grid_4">
			<div id="blocks" class="box tabbed">
		 		<div class="header">
				<h3>Acciones</h3>
				</div>
				<div class="content">
					<ul id="block-list-icons" class="block-list with-icon tab-content">
						<li class="i-16-calendar"><?php echo $this->Html->link('Lista propietarios', array('action'=>'index'))?></li>
						<li class="i-16-application"><?php echo $this->Html->link('Registrar ',array('action'=>'insertar'))?></li>
						<li class="i-16-drive">Imprimir</li>
						<li class="i-16-chart">Reportes</li>
						<li class="i-16-balloon">Lorem ipsum</li>
					</ul>
				</div> <!-- End of .content -->
				</div> <!-- End of .box -->
</div> <!-- End of .grid_4 -->